package com.jichangxiu.system.entity.dto.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jichangxiu.common.entity.dto.QueryEntity;
import com.jichangxiu.system.entity.bo.SysDataBo;
import com.jichangxiu.system.entity.po.SysData;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * QuerySysData:
 *
 * @author JiChangXiu
 * @create 2024-06-28 13:44:19
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统数据表")
@AutoMappers({
        @AutoMapper(target = SysData.class, reverseConvertGenerate = false),
        @AutoMapper(target = SysDataBo.class, reverseConvertGenerate = false)
})
public class QuerySysData extends QueryEntity {

    /**
     * ID
     */
    @Schema(description = "ID")
    private String id;

    /**
     * 键名
     */
    @Schema(description = "键名")
    private String key;

    /**
     * 键值
     */
    @Schema(description = "键值")
    private String value;

    /**
     * 显示样式
     */
    @Schema(description = "显示样式")
    private String display;

    /**
     * 是否默认
     */
    @Schema(description = "是否默认")
    private Boolean defaulted;

    /**
     * 字典ID
     */
    @Schema(description = "字典ID")
    private String typeId;

    /**
     * 显示顺序
     */
    @Schema(description = "显示顺序")
    private BigDecimal sort;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 是否启用
     */
    @Schema(description = "是否启用")
    private Boolean enabled;

    /**
     * 启用者
     */
    @Schema(description = "启用者")
    private String enabledBy;

    /**
     * 启用时间
     */
    @Schema(description = "启用时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date enabledTime;

    /**
     * 是否扩展
     */
    @Schema(description = "是否扩展")
    private Boolean isExtend;

}